-- GENERATED SPELL FOR [Ymirjar Element Shaper] --


function spell0_31267(pUnit, Event) --@Avalanche,n/a--
pUnit:FullCastSpellOnTarget(55216,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31267', 595, 1)
end

function spell1_31267(pUnit, Event) --@Torn Earth,n/a--
pUnit:FullCastSpellOnTarget(61897,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31267', 2000, 1)
end

function Sorts_31267(pUnit, Event)
local choix_sorts_31267 = math.random(0, 1)
if choix_sorts_31267 == 0 then
pUnit:RegisterEvent('spell0_31267', 1, 1)
end
if choix_sorts_31267 == 1 then
pUnit:RegisterEvent('spell1_31267', 1, 1)
end
end

function mob31267_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31267', math.random(1500, 3000), 1)
end

function mob31267_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31267_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31267_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31267, 1, 'mob31267_Action')
RegisterUnitEvent(31267, 2, 'mob31267_Leave')
RegisterUnitEvent(31267, 3, 'mob31267_Kill')
RegisterUnitEvent(31267, 4, 'mob31267_Die')
